<template>
  <uni-nav-bar
      :left-width="0"
      :right-width="5"
      :height="55"
      :fixed="true"
      background-color="gray"
  >
    <view slot="left" class="search-left">
      <uni-icons type="left" :size="35" @click="before"/>
    </view>

    <uni-search-bar :placeholder="title" @confirm="search" :maxlength="10" class="search-input"/>

    <view slot="right" class="search-right">
      <a href="http://sao315.com/w/api/saoyisao?redirect_url=http://www.jtyoui.com:20001/api/qrcode/data?code">
        <uni-icons type="scan" :size="30"/>
      </a>
    </view>

  </uni-nav-bar>
</template>

<script lang="ts" setup>
import UniNavBar from '@dcloudio/uni-ui/lib/uni-nav-bar/uni-nav-bar.vue';
import UniIcons from '@dcloudio/uni-ui/lib/uni-icons/uni-icons.vue';
import UniSearchBar from '@dcloudio/uni-ui/lib/uni-search-bar/uni-search-bar.vue';

defineProps({title: String})

function search() {

}

function before() {
  uni.navigateBack({
    delta: 1
  })
}
</script>

